package com.zhaozhe.stringarray;

/**
 * Created by zhaozhe on 2018/3/15.
 */
public class StringDelete {
    public static void main(String[] args) {
        String A = "abcdefgcdefawegfasdfasg";
        String B = "ab";

        String C = A.replace(B.charAt(0), ' ');
        C = C.replace(B.charAt(1), ' ');
        System.out.println("C: " + C.trim());

        String D = "";
        for (int i = 0; i < B.length(); i++){
            char c = B.charAt(i);
            D = A.replace(String.valueOf(c),"");
            A = D;
        }

        System.out.println("D: " + D);

    }
}
